<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "user_address".
 *
 * @property string $id
 * @property string $user_id
 * @property string $name
 * @property string $mobile
 * @property integer $province_id
 * @property string $province_name
 * @property integer $city_id
 * @property string $city_name
 * @property integer $area_id
 * @property string $area_name
 * @property string $address
 * @property string $is_default
 * @property string $app_id
 * @property integer $create_time
 */
class UserAddress extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'user_address';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['province_id', 'city_id', 'area_id', 'create_time'], 'integer'],
            [['id', 'user_id', 'province_name', 'city_name'], 'string', 'max' => 36],
            [['name', 'area_name', 'app_id'], 'string', 'max' => 30],
            [['mobile'], 'string', 'max' => 20],
            [['address'], 'string', 'max' => 300],
            [['is_default'], 'string', 'max' => 10],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'user_id' => 'User ID',
            'name' => 'Name',
            'mobile' => 'Mobile',
            'province_id' => 'Province ID',
            'province_name' => 'Province Name',
            'city_id' => 'City ID',
            'city_name' => 'City Name',
            'area_id' => 'Area ID',
            'area_name' => 'Area Name',
            'address' => 'Address',
            'is_default' => 'Is Default',
            'app_id' => 'App ID',
            'create_time' => 'Create Time',
        ];
    }
}
